<?php
ini_set('max_execution_time', 900);
set_time_limit(900);
ini_set("display_errors",1);
error_reporting(E_ALL);
function toArray($obj)
{
    if (is_object($obj)) $obj = (array)$obj;
    if (is_array($obj)) {
        $new = array();
        foreach ($obj as $key => $val) {
            $new[$key] = toArray($val);
        }
    } else {
        $new = $obj;
    }
    return $new;
}
echo '<pre>';


	$myarticles = file_get_contents('product/0.txt');	
	$objInfo = unserialize($myarticles);
	$arrInfo = toArray($objInfo);
	echo count($arrInfo);
	var_dump($arrInfo);
	//


echo '</pre>';
?> 